<?php 

				require '../languages/'.$_SESSION["lang"].'.const.php';
				$sql = 
							 "SELECT 
								 p.plan_data,
								 pd.title,
								 pd.description 
							  FROM 
								 plans as p,
								 plan_description as pd 
							  WHERE 
								 pd.plan_id = p.plan_id
								 AND pd.lang_id = '".$_SESSION['lang_id']."'
								 AND p.published
							  
							 ";
				$result = query($sql);
				$plans = '';
				
			

?>

  
 <div class="compare-plans cf">
                    <ul class="cp-feature-list cf">
                        <li>SERVICE</li>
                        <?php foreach($plan_table as $lable) {?>
                        <li>
                            <div class="cp-feature"><span><?=$lable?></span><span></span></div>
                        </li>
                        <?php } ?>
                     </ul>
                     
                     <?php while($row = mysql_fetch_object($result)){
							$plan = unserialize($row->plan_data);
							
					 ?>
                     <ul class="cp-feature-description-list cf">
                        <li><?=stripslashes($row->title)?></li>
                        
                        <?php 
						
						foreach($plan as $key=>$value) 
								{ 
									 if($key != 'is_submitted' && $key != 'redirectForm' && $key != 'published'){
										if($key != 'p1m' && $key != 'p3m' && $key != 'p6m' && $key != 'p12m'){
											if($value == '-1')	 $value	 = __Unlimited;
											if($key == 'simultaneous_access' || $key == 'audio_conference' || $key == 'fax' || $key == 'wvacc3' || $key == 'voice_mail' || $key == 'call_back'  )	 $value	 = '<span class="tick-'.$value.'"></span>';
											
						?>		
										<li>
                                        	<div class="cp-feature-description"><?=$value.$plan_dim[$key]?></div> 
										</li>
						<?php				
										}
										
									 }
								} 
						
						?>
                       
                        
                     </ul>
                      <?php } ?>
 </div>
 
 <script>
		 $('#popup-page header h2').html('<?=__COMPARE_PLANS?>');
	 </script> 